<cfcomponent output="false" extends="mxunit.framework.TestCase">
<cfscript>


 function testInitSetsResourceDirectory() {
   sys = createObject('java', 'java.lang.System').setProperty('org.owasp.esapi.resources', 'humpty/dumpty/.esapi');
   assertEquals( 'humpty/dumpty/.esapi', config.getResourceDirectory());

  }

  function esapiOnInitShouldConfigureLogger() {

      //debug(esapi);
      logger = esapi.logger('main-logger');
      //debug(logger);
      logger.info('info from mxunit test');

      v = esapi.validator();
      actual = v.isValidInput("test", "should be bad email", "Email", 100, false);
      assert(!actual);


  }



  function setUp(){
    esapi = createObject('component', 'cfesapi.org.owasp.esapi.ESAPI').init();
    config = esapi.securityConfiguration();
  }

  function tearDown(){
    sys = createObject('java', 'java.lang.System').setProperty('org.owasp.esapi.resources', '/home/billy/webapps/cfesapi/resources/.esapi');
    // assertEquals('/home/billy/webapps/cfesapi/resources/.esapi', config.getResourceDirectory());

  }


</cfscript>
</cfcomponent>